import authRequest from "../supports/requests/authRequest";

export function getAddresses() {
  return authRequest('addresses')
}

export function getDefaultAddress() {
  return authRequest('addresses/default/address')
}

export function getAddress(id) {
  return authRequest('addresses/' + id)
}

export function createAddress(data) {
  return authRequest('addresses', { method: 'post', data: data })
}

export function updateAddress(id, data) {
  return authRequest('addresses/update/' + id, { method: 'put', data: data })
}

export function deleteAddress(id) {
  return authRequest('addresses/' + id, { method: 'delete' })
}
